]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
aggregateMenu: Include action buttons in width computation again
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 20 Mar 2019 12:48:21 +0000 (12:48 +0000)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 21 Mar 2019 10:08:29 +0000 (10:08 +0000)
Commit 1b169655ac removed the system indicator from the list of children
that are considered for the overall menu width, because we do want the
log-out submenu to adapt to the available width.

However as a side effect, action buttons no longer contribute to the
width either, so if extensions add additional buttons, the menu is
likely to overflow.

Avoid this by only adding the button group to the list of size children.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1094

js/ui/panel.js
js/ui/status/system.js

index 1d9621ae388669146cfe5fc374a5c3253a2d734e..0f052d3e83b0f8e836b73fdc654a6c9326f33643 100644 (file)
@@ -809,6 +809,7 @@ class AggregateMenu extends PanelMenu.Button {
         menuLayout.addSizeChild(this._location.menu.actor);
         menuLayout.addSizeChild(this._rfkill.menu.actor);
         menuLayout.addSizeChild(this._power.menu.actor);
+        menuLayout.addSizeChild(this._system.buttonGroup);
     }
 });
 
index 701d9db330c8097c7c51b6ebaa62c5ec550d2dd0..1b0d10d8c331f127aeca77fc16d59b6a8b917294 100644 (file)
@@ -236,6 +236,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
 
         item = new PopupMenu.PopupBaseMenuItem({ reactive: false,
                                                  can_focus: false });
+        this.buttonGroup = item.actor;
 
         let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
             'gnome-control-center.desktop'